import { CoolController, BaseController } from '@cool-midway/core';
import { BizOrderProofListService } from '../../service/proofList';
import { Body, Inject, Post } from '@midwayjs/core';

/**
 * 订单凭证服务
 */
@CoolController()
export class BizOrderProofListAppController extends BaseController {
  @Inject()
  bizOrderProofListService: BizOrderProofListService;

  @Post('/checkoutUploadProof', {
    summary: '检查工人订单是否上传凭证',
  })
  async checkoutUploadProof(
    @Body('orderId') orderId: number,
    @Body('workerId') workerId: number
  ) {
    return this.ok(
      await this.bizOrderProofListService.checkoutUploadProof(orderId, workerId)
    );
  }
}
